{include file="../Public/public.html"}
<div class="admin">
	<form action="index.php?p=Admin&c=Article&a=realDels" method="POST">
    <div class="panel admin-panel">
    	<div class="panel-head"><strong>文章列表</strong></div>
        <div class="padding border-bottom">
            <input type="button" class="button button-small checkall" name="checkall" checkfor="art_id[]" value="全选" />
            <input type="button" id="btnAdd" class="button button-small border-green" value="添加文章" />
            <input type="submit" class="button button-small border-yellow" id="plsc"  value="批量删除" />
            <a href="index.php?p=Admin&c=Article&a=recycle">
                    <input type="button" class="button button-small border-blue" value="回收站" />
            </a>
        </div>
        <table class="table table-hover">
        	<tr>
                <th width="45">选择</th>
                <th width="120">所属类别</th>
                <th width="200">文章标题</th>
                <th width="120">点击率</th>
                <th width="180">发布时间</th>
                <th width="100">操作</th>
            </tr>
            {foreach from=$artInfo item=row}
            <tr>
                <td><input type="checkbox" name="art_id[]" value="{$row.art_id}" /></td>
                <td>{$row.cate_name}</td>
                <td>{$row.title}</td>
                <td>{$row.hits}</td>
                <td>{$row.addtime}</td>
                <td>
                    <a class="button border-blue button-little" href="index.php?p=Admin&c=Article&a=recover&art_id={$row.art_id}">还原</a> 
                    <a class="button border-yellow button-little" href="index.php?p=Admin&c=Article&a=realDel&art_id={$row.art_id}" onclick="return confirm('确定删除吗')">删除</a>
                </td>
            </tr>
            {/foreach}
        </table>

		<div class="panel-foot text-center">
            {$strPage}
        </div>
    </div>
    </form>
    <br />
    <p class="text-right text-gray" style="float:right">基于<a class="text-gray" target="_blank" href="#">MVC框架</a>构建</p>
</div>



    <script>
        $(function(){
            $('#btnAdd').click(
                function(){
                    window.location.href  = 'index.php?p=Admin&c=Article&a=add';
                }
            );
        });
        $(function(){
    $('#top-nav>li').click(function(){
        $(this).addClass('active').siblings().removeClass('active');
    });
});

    </script>


{include file='../Public/script.html'}

<script src="{$smarty.const.JS_DIR}/article.js"></script>
</body>
</html>